package com.upcode.weighing.vo.req.pc;

import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper=false)
public class AppPlamtopHallListReqVo {

    private Long treeTopId;

    private Long treeId;

    private Integer isShow;

    public String checkParams(){
        if(null == treeTopId){
            return "顶级节点不可为空";
        }
        if(null == treeId){
            return "顶子节点ID不可为空";
        }
        if(treeId == -1){
            this.treeTopId = 1L;
            this.treeId = null;
        }else if(treeId == -2){
            this.treeTopId = 2L;
            this.treeId = null;
        }
        if(treeTopId == -1){
            this.treeTopId = 1L;
        }else if(treeTopId == -2){
            this.treeTopId = 2L;
        }
        return null;
    }
}
